/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesMatUseLog extends BasicModel<MesMatUseLog> {
  ddate?: string; // 日期
  moid?: string; // 订单ID
  mocode?: string; // 订单号
  lineCode?: string; // 机台
  iqty?: number; // 投料数量
  createByName?: string; // 投料人
}

export const mesMatUseLogList = (params?: MesMatUseLog | any) =>
  defHttp.get<MesMatUseLog>({ url: adminPath + '/mo/register/mesMatUseLog/list', params });

export const mesMatUseLogListData = (params?: MesMatUseLog | any) =>
  defHttp.post<Page<MesMatUseLog>>({ url: adminPath + '/mo/register/mesMatUseLog/listData', params });

export const mesMatUseLogForm = (params?: MesMatUseLog | any) =>
  defHttp.get<MesMatUseLog>({ url: adminPath + '/mo/register/mesMatUseLog/form', params });

export const mesMatUseLogSave = (params?: any, data?: MesMatUseLog | any) =>
  defHttp.postJson<MesMatUseLog>({ url: adminPath + '/mo/register/mesMatUseLog/save', params, data });

export const mesMatUseLogDelete = (params?: MesMatUseLog | any) =>
  defHttp.get<MesMatUseLog>({ url: adminPath + '/mo/register/mesMatUseLog/delete', params });
